/**
 * @file 常量定义，定义所有ajax接口的path
 * @author liushuang(liushuang04@baijia.com)
 * @date 2019-11-15
 */

const ajaxConfig = {
    HttpCode: {
        // 取消请求
        CANCEL: 410,
        // 请求超时
        TIMEOUT: 500,
        // 请求成功
        OK: 200,
        // 需要登录
        RELOGIN: 700,
    },
    USER: {
        GET_USER_INFO: '/api/cas/getAuth',
        LOG_OUT: '/api/cas/logout',
    },
    // 报表
    REPORT: {
        GET_MENU: '/api/portal/menu',
        GET_REPORT_INFO: '/api/portal/detail',
        DOWNLOAD_REPORTS: '/api/portal/download',
        GET_DATA_MAP: '/api/portal/map',
        FETCH_SELECTION: '/api/portal/select',
        FETCH_REPORTS: '/api/portal/search',
        GET_REPORTLIST: '/api/portal/reportList',
    },
    // 性能统计可视化
    PERFORMANCE: {
        CORE_PAGES: '/api/performance/corepage',
        DOWNLOAD_CORE_PAGES: '/api/performance/corepage/download',
        RANK_PAGES_DIMENSION: '/api/performance/field/values',
        RANK_PAGES_TABLE: '/api/performance/analysis/rank',
        USER_FEATURE_FIELD: '/api/performance/user/feature/field',
        USER_FEATURE_USER_LIST: 'api/performance/user/feature/list',
        USER_FEATURE_AREA: '/api/performance/user/feature/area',
        DOWNLOAD_USER_LIST: '/api/performance/analysis/feature/list/download',
        IMPORTANCE_LIST: '/api/performance/analysis/targetImportance',
        BIZ_REFERENCE: '/api/performance/preference/getBizPreference',
        TARGET_REFERENCE: '/api/performance/preference/getTargetPreference',
        ADD_REFERENCE: '/api/performance/preference/addPreference',
        DELETE_REFERENCE: '/api/performance/preference/deleteTarget',
        SAVE_SORT_REFERENCE: '/api/performance/preference/reorderBizName',
        SAVE_SORT_TARGET: '/api/performance/preference/reorderTarget',
        ALL_REFERENCE: '/api/performance/preference/getAllPreference',
        CHECK_DUPLICATE: '/api/performance/preference/checkForDup',
        PAGE_BIZ_LIST: '/api/performance/preference/getBizInPage',
    },
    // 页面性能分析
    Analysis: {
        GET_FIELD_VALUES: '/api/performance/field/values',
        GET_ANALYSIS_FEATURE_DATA: '/api/performance/analysis/feature',
        GET_ANALYSIS_TREND: '/api/performance/analysis/trend',
        GET_ANALYSIS_TREND_DETAIL: '/api/performance/analysis/trend/detail',
        DOWNLOAD_TREND_LIST: '/api/performance/analysis/trend/detail/download',
        GET_ANALYSIS_DISTRIBUTION: '/api/performance/analysis/distribution'
    },
    SCREEN: {
        GET_SCREEN_INFO: '/api/screen/stat',
        GET_GAOTU_GROUP: '/api/screen/team/stat',
        GET_SCREEN_LIST: '/api/screen/search',
        DELETE_SCREEN: '/api/screen/delete',
        CREATE_SCREEN: '/api/screen/create',
        GET_SCREEN_DETAIL: '/api/screen/detail',
        UPDATE_SCREEN: '/api/screen/update',
        GET_ACCOUNT_SEARCH: '/api/cas/account/searchAccountsFuzzy'
    },
    // 好课销售
    SALES: {
        DEPARTMENT: '/api/sale/haoke/department',
        CHANNEL: '/api/sale/haoke/channel',
        CATEGORY: '/api/sale/haoke/chatroom/category',
        CREATE: '/api/sale/haoke/create',
        UPDATE: '/api/sale/haoke/update',
        DETAIL: '/api/sale/haoke/detail',
        UPDATE_NAME: '/api/sale/haoke/updateSale',
        CHATROOM_LIST: '/api/sale/haoke/chatroom/search',
        ADV_LIST: '/api/sale/haoke/adversing/search',
        ADV_DOWNLOAD: '/api/sale/haoke/adversing/download',
        CHATROOM_DOWNLOAD: '/api/sale/haoke/chatroom/download',
        DELETE: '/api/sale/haoke/delete'
    },
    PAYBOARD: {
        GET_SEARCH_RESULT: '/api/ordersPaidThisMonth/values',
        PAY_BOARD_SELECT: '/api/ordersPaidThisMonth/select',
        PAY_BOARD_DETAIL: '/api/ordersPaidThisMonth/detail',
        PAY_BOARD_DOWNLOAD: '/api/ordersPaidThisMonth/download'
    },
    REPORTSCHART: {
        GET_TRANSFORM_VALUES: '/api/transformation/values',
        TRANSFORM_SELECT: '/api/transformation/select',
        TRANSFORM_DETAIL: '/api/transformation/detail',
        TRANSFORM_DOWNLOAD: '/api/transformation/download',
    },
    REFUND_REPORT: {
        QUERY_VALUES: '/api/agility/view/values',
        QUERY_SELECT_OPTIONS: '/api/agility/view/select',
        QUERY_DETAIL: '/api/agility/view/detail',
        DOWNLOAD: '/api/agility/view/download',
        CENTRAL_TABLE: '/api/agility/central/values',
        QUERY_SELECT_OPTIONS_1: '/api/agility/central/select',
        QUERY_CENTRAL_VALUES: '/api/agility/central/valuesBar',
    },
    GENERAL_VIEW_REPORT: {
        QUERY_SELECT_OPTIONS: '/api/generalView/select',
        QUERY_PART1_VALUES: '/api/generalView/valuesOne',
        QUERY_PART2_VALUES: '/api/generalView/valuesTwo',
        QUERY_DETAIL_IN_PART1: '/api/generalView/detailOne',
        QUERY_DETAIL_IN_PART2: '/api/generalView/detailTwo',
        DOWNLOAD_IN_PART1: '/api/generalView/downloadOne',
        DOWNLOAD_IN_PART2: '/api/generalView/downloadTwo',
    },
    SHORT_PERIOD_CLASS: {
        GET_SHORT_PERIOD_VALUES: '/api/transformationCourses/values',
        SHORT_PERIOD_SELECT: '/api/transformationCourses/select',
        SHORT_PERIOD_DETAIL: '/api/transformationCourses/detail',
        SHORT_PERIOD_DOWNLOAD: '/api/transformationCourses/download'
    },
    WIND_CONTROL: {
        GET_WIND_CONTROL_VALUES: '/api/riskControl/values',
        WIND_CONTROL_SELECT: '/api/riskControl/select',
        WIND_CONTROL_DETAIL: '/api/riskControl/detail',
        WIND_CONTROL_DOWNLOAD: '/api/riskControl/download'
    },
    SPECIAL_CLASS: {
        QUERY_R1_CARD2_VALUE: '/api/specialSubject/cardValueTwo',
        QUERY_R1_CARD4_VALUE: '/api/specialSubject/values',
        QUERY_R1_CARD5_VALUE: '/api/specialSubject/cardValue',
        QUERY_R4_LINE: '/api/specialSubject/valuesLine',
    },
    STRING_XU_BAN: {
        QUERY_VALUES: '/api/springContinuation/values',
        QUERY_EXCEL_VALUES: '/api/springContinuation/excelValues',
        QUERY_EXCEL_PERCENT_VALUES: '/api/springContinuation/valuesPercentage',
        CAROUSEL_MESSAGE: '/api/agility/notification/message',
    }
};

export default ajaxConfig;
